<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: ailayer_relu_avr_pgm.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('ailayer__relu__avr__pgm_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ailayer_relu_avr_pgm.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>AVR PGM implementation of the <a class="el" href="ailayer__relu_8h.html">ReLU layer </a>.  
<a href="#details">More...</a></p>

<p><a href="ailayer__relu__avr__pgm_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac34eb942e23f9e6786aa5a6acad21b8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ailayer__relu__avr__pgm_8h.html#ac34eb942e23f9e6786aa5a6acad21b8d">ailayer_relu_q7_avr_pgm</a> (<a class="el" href="structailayer__relu.html">ailayer_relu_q7_t</a> *layer, <a class="el" href="structailayer.html">ailayer_t</a> *input_layer)</td></tr>
<tr class="memdesc:ac34eb942e23f9e6786aa5a6acad21b8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes and connect a <a class="el" href="ailayer__relu_8h.html">ReLU layer </a> with the <a class="el" href="aimath__q7_8h.html">Q7 </a> AVR PGM implementation.  <a href="ailayer__relu__avr__pgm_8h.html#ac34eb942e23f9e6786aa5a6acad21b8d">More...</a><br /></td></tr>
<tr class="separator:ac34eb942e23f9e6786aa5a6acad21b8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>AVR PGM implementation of the <a class="el" href="ailayer__relu_8h.html">ReLU layer </a>. </p>
<dl class="section version"><dt>Version</dt><dd>2.2.0 </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2020-2023 Fraunhofer Institute for Microelectronic Circuits and Systems. All rights reserved.<br  />
<br  />
 AIfES is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br  />
<br  />
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.<br  />
<br  />
 You should have received a copy of the GNU Affero General Public License along with this program. If not, see <a href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>.</dd></dl>
<p>AVR controller specific implementation of the ReLU layer in <a class="el" href="aimath__q7_8h.html">Q7 </a> data-type. For more information about the ReLU layer refer to <a class="el" href="ailayer__relu_8h.html" title="Base layer  implementation of the ReLU activation layer.">ailayer_relu.h</a>.</p>
<p><em>Requires <a href="https://www.nongnu.org/avr-libc/user-manual/pgmspace_8h.html">avr/pgmspace.h library</a></em> </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ac34eb942e23f9e6786aa5a6acad21b8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac34eb942e23f9e6786aa5a6acad21b8d">&#9670;&nbsp;</a></span>ailayer_relu_q7_avr_pgm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structailayer.html">ailayer_t</a>* ailayer_relu_q7_avr_pgm </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structailayer__relu.html">ailayer_relu_q7_t</a> *&#160;</td>
          <td class="paramname"><em>layer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structailayer.html">ailayer_t</a> *&#160;</td>
          <td class="paramname"><em>input_layer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes and connect a <a class="el" href="ailayer__relu_8h.html">ReLU layer </a> with the <a class="el" href="aimath__q7_8h.html">Q7 </a> AVR PGM implementation. </p>
<p>The quantization parameters of the result tensor of the input layer must be defined constant in program memory (PROGMEM). The layer configuration is the same as with <a class="el" href="ailayer__relu__default_8h.html#a4c88d45b618f28ebcfb3e84c00ca4e06" title="Initializes and connect a ReLU layer  with the Q7  default implementation.">ailayer_relu_q7_default()</a>.</p>
<p><b>The quantization parameters of the result tensor are automatically set to {shift = input_layer.result.shift, zero_point = input_layer.result.zero_point} because the output values are in the interval [0, max(input_layer.result)].</b></p>
<p><b>Example:</b> Create the layer structure:<br  />
</p><div class="fragment"><div class="line"><a class="code" href="structailayer__relu.html">ailayer_relu_q7_t</a> relu_layer;</div>
<div class="ttc" id="astructailayer__relu_html"><div class="ttname"><a href="structailayer__relu.html">ailayer_relu</a></div><div class="ttdoc">General ReLU layer  struct.</div><div class="ttdef"><b>Definition:</b> ailayer_relu.h:51</div></div>
</div><!-- fragment --><p> or </p><div class="fragment"><div class="line"><a class="code" href="structailayer__relu.html">ailayer_relu_q7_t</a> relu_layer = AILAYER_RELU_Q7_M();</div>
</div><!-- fragment --><p><b>Example:</b> Initialize and connect the layer:<br  />
</p><div class="fragment"><div class="line">x = <a class="code" href="ailayer__relu__avr__pgm_8h.html#ac34eb942e23f9e6786aa5a6acad21b8d">ailayer_relu_q7_avr_pgm</a>(&amp;relu_layer, x);</div>
<div class="ttc" id="aailayer__relu__avr__pgm_8h_html_ac34eb942e23f9e6786aa5a6acad21b8d"><div class="ttname"><a href="ailayer__relu__avr__pgm_8h.html#ac34eb942e23f9e6786aa5a6acad21b8d">ailayer_relu_q7_avr_pgm</a></div><div class="ttdeci">ailayer_t * ailayer_relu_q7_avr_pgm(ailayer_relu_q7_t *layer, ailayer_t *input_layer)</div><div class="ttdoc">Initializes and connect a ReLU layer  with the Q7  AVR PGM implementation.</div></div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*layer</td><td>The layer structure to initialize. </td></tr>
    <tr><td class="paramname">*input_layer</td><td>The prior layer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The (successfully) initialized layer structure. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1e5d3661ed79af157d57e64a38265d09.html">basic</a></li><li class="navelem"><a class="el" href="dir_fb1774f2d451d1d60e2f94b58c26876a.html">avr_pgm</a></li><li class="navelem"><a class="el" href="dir_d4aecd3e669fa8d7564b42ac9f614d7c.html">ailayer</a></li><li class="navelem"><a class="el" href="ailayer__relu__avr__pgm_8h.html">ailayer_relu_avr_pgm.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
